<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
	<constant name="struts.enable.DynamicMethodInvocation" value="false" />
	<constant name="struts.devMode" value="false" />
	<constant name="struts.custom.i18n.resources" value="ApplicationResources" />
	<constant name="struts.devMode" value="true" />
	
	<package name="default" extends="struts-default">
		<result-types>
      		<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
    	</result-types>
		
		<action name="login" class="it.apiconsulting.live.view.LoginAction" method="execute">
            <result name="success" type="chain">homePage</result>
            <result name="error">index.jsp</result>
        </action>
        
        <action name="homePage" class="it.apiconsulting.live.view.HomePageAction" method="execute">
            <result name="success" type="tiles">welcome</result>
        </action>
	
		<!-- INSERIMENTO CLIENTE -->
		<action name="gestioneCliente" class="it.apiconsulting.live.view.ClienteAction" method="execute">
			<result name="success" type="chain">insCliente</result>
		</action>
		<action name="addCliente" class="it.apiconsulting.live.view.ClienteAction" method="add">
			<result name="success" type="chain">gestioneCliente</result>
			<result name="input" type="chain">insCliente</result>
		</action>
		<action name="deleteCliente" class="it.apiconsulting.live.view.ClienteAction" method="delete">
			<result name="success" type="chain">insCliente</result>
		</action>
		<action name="editCliente" class="it.apiconsulting.live.view.ClienteAction" method="edit">
			<result name="success" type="chain">insCliente</result>
		</action>
		<action name="insCliente" class="it.apiconsulting.live.view.ClienteAction">
			<result name="success" type="tiles">gestClientePage</result>
		</action>
		
		<!-- INSERIMENTO PRODOTTO -->
		<action name="gestioneProdotto" class="it.apiconsulting.live.view.GestioneProdottoAction" method="execute">
			<result name="success" type="chain">insProdotto</result>
		</action>
		<action name="addProdotto" class="it.apiconsulting.live.view.ProdottoAction" method="add">
			<result name="success" type="chain">insProdotto</result>
			<result name="input" type="chain">insProdotto</result>
		</action>
		<action name="deleteProdotto" class="it.apiconsulting.live.view.ProdottoAction" method="delete">
			<result name="success" type="chain">insProdotto</result>
		</action>
		<action name="editProdotto" class="it.apiconsulting.live.view.ProdottoAction" method="edit">
			<result name="success" type="chain">insProdotto</result>
		</action>
		<action name="insProdotto" class="it.apiconsulting.live.view.ProdottoAction">
			<result name="success" type="tiles">gestProdottoPage</result>
		</action>
		
		<!-- INSERIMENTO CATEGORIA -->
		<action name="gestioneCategoria" class="it.apiconsulting.live.view.GestioneCategoriaAction" method="execute">
			<result name="success" type="chain">insCategoria</result>
		</action>
		<action name="addCategoria" class="it.apiconsulting.live.view.CategoriaAction" method="add">
			<result name="success" type="chain">insCategoria</result>
			<result name="input" type="chain">insCategoria</result>
		</action>
		<action name="deleteCategoria" class="it.apiconsulting.live.view.CategoriaAction" method="delete">
			<result name="success" type="chain">insCategoria</result>
		</action>
		<action name="editCategoria" class="it.apiconsulting.live.view.CategoriaAction" method="edit">
			<result name="success" type="chain">insCategoria</result>
		</action>
		<action name="insCategoria" class="it.apiconsulting.live.view.CategoriaAction">
			<result name="success" type="tiles">gestCategoriaPage</result>
		</action>
		
		<!-- INSERIMENTO NOLEGGIO -->
		<action name="gestioneNoleggio" class="it.apiconsulting.live.view.GestioneNoleggioAction" method="execute">
			<result name="success" type="chain">insNoleggio</result>
		</action>
		<action name="addNoleggio" class="it.apiconsulting.live.view.NoleggioAction" method="add">
			<result name="success" type="chain">insNoleggio</result>
			<result name="input" type="chain">insNoleggio</result>
		</action>
		<action name="deleteNoleggio" class="it.apiconsulting.live.view.NoleggioAction" method="delete">
			<result name="success" type="chain">insNoleggio</result>
		</action>
		<action name="insNoleggio" class="it.apiconsulting.live.view.NoleggioAction">
			<result name="success" type="tiles">gestNoleggioPage</result>
		</action>		
		<action name="addElemNoleggio" class="it.apiconsulting.live.view.NoleggioAction" method="addElemNoleggio">
			<result name="success" type="tiles">gestNoleggioPage</result>
		</action>		
		
		<!-- INSERIMENTO SOTTOCATEGORIA -->
		<action name="gestioneSottoCategoria" class="it.apiconsulting.live.view.GestioneSottoCategoriaAction" method="execute">
			<result name="success" type="chain">insSottoCategoria</result>
		</action>
		<action name="addSottoCategoria" class="it.apiconsulting.live.view.SottoCategoriaAction" method="add">
			<result name="success" type="chain">insSottoCategoria</result>
			<result name="input" type="chain">insSottoCategoria</result>
		</action>
		<action name="deleteSottoCategoria" class="it.apiconsulting.live.view.SottoCategoriaAction" method="delete">
			<result name="success" type="chain">insSottoCategoria</result>
		</action>
		<action name="editSottoCategoria" class="it.apiconsulting.live.view.SottoCategoriaAction" method="edit">
			<result name="success" type="chain">insSottoCategoria</result>
		</action>
		<action name="insSottoCategoria" class="it.apiconsulting.live.view.SottoCategoriaAction">
			<result name="success" type="tiles">gestSottoCategoriaPage</result>
		</action>
		
		<!-- INSERIMENTO UTENTE -->
		<action name="gestioneUtente" class="it.apiconsulting.live.view.GestioneUtenteAction" method="execute">
			<result name="success" type="chain">insUtente</result>
		</action>
		<action name="addUtente" class="it.apiconsulting.live.view.UtenteAction" method="add">
			<result name="success" type="chain">insUtente</result>
			<result name="input" type="chain">insUtente</result>
		</action>
		<action name="deleteUtente" class="it.apiconsulting.live.view.UtenteAction" method="delete">
			<result name="success" type="chain">insUtente</result>
		</action>
		<action name="insUtente" class="it.apiconsulting.live.view.UtenteAction">
			<result name="success" type="tiles">gestUtentePage</result>
		</action>
		
	</package>
</struts>
